<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>行程信息</title>
    <%@include file="../include/commonFile.jsp" %>
    <link rel="stylesheet" href="${ctx}/css/ui/gatherInfo/gather_info_detail.css">
</head>
<body>
<form id="myForm" class="layui-form info-container" action="${ctx}/gatherInfo/member/verifyItineraryInfo.do">
    <fieldset class="aui-field-title">
        <legend>个人信息</legend>
    </fieldset>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td class="tr">姓&emsp;&emsp;名</td>
            <td class="tl">${member.fullname}</td>
        </tr>
        <tr>
            <td class="tr">公&emsp;&emsp;司</td>
            <td class="tl">${member.company}</td>
        </tr>
        <tr>
            <td class="tr">职&emsp;&emsp;务</td>
            <td class="tl">${member.jobTitle}</td>
        </tr>
        <tr>
            <td class="tr">手&emsp;&emsp;机</td>
            <td class="tl">${member.mobile}</td>
        </tr>
        </tbody>
    </table>

    <fieldset class="aui-field-title">
        <legend>去程信息</legend>
    </fieldset>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <c:forEach varStatus="st" items="${memberInfo.goItineraries}" var="go">
            <tr>
                <td class="tr">
                    <b style="font-size: 16px">
                        <c:if test="${st.index == 0}">首段行程</c:if>
                        <c:if test="${st.index == 1}">第二段行程</c:if>
                    </b>
                </td>
                <td></td>
            </tr>
            <tr>
                <td class="tr">出行方式</td>
                <td class="tl">${go.travelType}</td>
            </tr>
            <tr>
                <td class="tr">出发班次</td>
                <td class="tl">${go.travelNumber}</td>
            </tr>
            <tr>
                <td class="tr">出发城市</td>
                <td class="tl">${go.departCity}</td>
            </tr>
            <tr>
                <td class="tr">到达城市</td>
                <td class="tl">${go.arrivalCity}</td>
            </tr>
            <tr>
                <td class="tr">出发站点</td>
                <td class="tl">${go.departStation}</td>
            </tr>
            <tr>
                <td class="tr">到达站点</td>
                <td class="tl">${go.arrivalStation}</td>
            </tr>
            <tr>
                <td class="tr">出发时间</td>
                <td class="tl"><fmt:formatDate value="${go.departTime}" pattern="yyyy-MM-dd HH:mm"/></td>
            </tr>
            <tr>
                <td class="tr">到达时间</td>
                <td class="tl"><fmt:formatDate value="${go.arrivalTime}" pattern="yyyy-MM-dd HH:mm"/></td>
            </tr>
        </c:forEach>
        <tr>
            <td class="tr"> 是否需要接</td>
            <td class="tl">
                <c:if test="${not empty goFirst.isNeedShuttle}">
                    <c:if test="${goFirst.isNeedShuttle == 1}">是</c:if>
                    <c:if test="${goFirst.isNeedShuttle == 2}">否</c:if>
                </c:if>
            </td>
        </tr>
        </tbody>
    </table>
    <fieldset class="aui-field-title">
        <legend>返程信息</legend>
    </fieldset>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <%--<tr>
            <td class="tr">填写返程信息</td>
            <td class="tl">
                <c:if test="${not empty backFirst.isMustWrite}">
                    <c:if test="${backFirst.isMustWrite == 1}">是</c:if>
                    <c:if test="${backFirst.isMustWrite == 2}">否</c:if>
                </c:if>
            </td>
        </tr>--%>
        <c:if test="${fn:length(memberInfo.backItineraries) > 0}">
            <c:forEach varStatus="st" items="${memberInfo.backItineraries}" var="back">
                <tr>
                    <td class="tr">出行方式</td>
                    <td class="tl">${back.travelType}</td>
                </tr>
                <tr>
                    <td class="tr">出发班次</td>
                    <td class="tl">${back.travelNumber}</td>
                </tr>
                <tr>
                    <td class="tr">出发城市</td>
                    <td class="tl">${back.departCity}</td>
                </tr>
                <tr>
                    <td class="tr">到达城市</td>
                    <td class="tl">${back.arrivalCity}</td>
                </tr>
                <tr>
                    <td class="tr">出发站点</td>
                    <td class="tl">${back.departStation}</td>
                </tr>
                <tr>
                    <td class="tr">到达站点</td>
                    <td class="tl">${back.arrivalStation}</td>
                </tr>
                <tr>
                    <td class="tr">出发时间</td>
                    <td class="tl"><fmt:formatDate value="${back.departTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                </tr>
                <tr>
                    <td class="tr">到达时间</td>
                    <td class="tl"><fmt:formatDate value="${back.arrivalTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                </tr>
            </c:forEach>
            <tr>
                <td class="tr"> 是否需要送</td>
                <td class="tl">
                    <c:if test="${not empty backFirst.isNeedShuttle}">
                        <c:if test="${backFirst.isNeedShuttle == 1}">是</c:if>
                        <c:if test="${backFirst.isNeedShuttle == 2}">否</c:if>
                    </c:if>
                </td>
            </tr>
        </c:if>
        </tbody>
    </table>
    <c:if test="${not empty memberInfo.publicRoomType || not empty memberInfo.isNeedArrange}">
        <fieldset class="aui-field-title">
            <legend>住宿信息</legend>
        </fieldset>
    </c:if>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="160">
            <col>
        </colgroup>
        <tbody>
        <c:if test="${not empty memberInfo.publicRoomType}">
            <tr>
                <td class="tr"> 官方提供房间类型</td>
                <td class="tl">
                    <c:if test="${memberInfo.publicRoomType == 1}">单间</c:if>
                    <c:if test="${memberInfo.publicRoomType == 2}">标间</c:if>
                </td>
            </tr>
        </c:if>
        <c:if test="${not empty memberInfo.isNeedArrange}">
            <tr>
                <td class="tr">需要官方协助安排住宿</td>
                <td class="tl">
                    <c:if test="${memberInfo.isNeedArrange == 1}">是</c:if>
                    <c:if test="${memberInfo.isNeedArrange == 2}">否</c:if>
                </td>
            </tr>
        </c:if>
        <c:if test="${memberInfo.isNeedArrange == 1}">
            <tr>
                <td class="tr">住宿开始时间</td>
                <td class="tl"><fmt:formatDate value="${memberInfo.roomStartTime}" pattern="yyyy-MM-dd"/></td>
            </tr>
            <tr>
                <td class="tr">住宿结束时间</td>
                <td class="tl"><fmt:formatDate value="${memberInfo.roomEndTime}" pattern="yyyy-MM-dd"/></td>
            </tr>
            <tr>
                <td class="tr"> 房间类型</td>
                <td class="tl">
                    <c:if test="${not empty memberInfo.privateRoomType}">
                        <c:if test="${memberInfo.privateRoomType == 1}">单间</c:if>
                        <c:if test="${memberInfo.privateRoomType == 2}">标间</c:if>
                    </c:if>
                </td>
            </tr>
        </c:if>
        </tbody>
    </table>
    <fieldset class="aui-field-title">
        <legend>其他</legend>
    </fieldset>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td class="tr"> 备注信息</td>
            <td class="tl">${memberInfo.remarks}</td>
        </tr>
        <tr>
            <td class="tr">审核状态</td>
            <td class="tl">
                <input type="radio" name="perfectState" lay-filter="itineraryStatus" value="1" title="待审核"
                ${memberInfo.itineraryStatus == "1" ? 'checked="checked"' : ''} />
                <input type="radio" name="perfectState" lay-filter="itineraryStatus" value="2" title="通过"
                ${memberInfo.itineraryStatus == "2" ? 'checked="checked"' : ''} />
                <input type="radio" name="perfectState" lay-filter="itineraryStatus" value="3" title="未通过"
                ${memberInfo.itineraryStatus == "3" ? 'checked="checked"' : ''} />
                <input type="hidden" name="id" value="${memberInfo.id}"/>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="footer-buttons">
        <a class="layui-btn layui-btn-danger" lay-submit lay-filter="*" href="javascript:void(0)">提交</a>
        <a class="layui-btn layui-btn-normal" href="javascript:closeSelf()">取消</a>
    </div>
    <div class="footer-place"></div>
</form>
<%@include file="../include/incScript.jsp" %>
<script type="text/javascript">
    $(function () {
        layui.use(['form'], function () {
            var form = layui.form;

            //监听提交
            form.on('submit', function (data) {
                txz.submitObject(data.elem, function (callBack) {
                    var action = $("#myForm").attr("action");
                    $.post(action, $('#myForm').serialize(), function (res) {
                        typeof callBack === 'function' && callBack();
                        if (res.success) {
                            util.layerMsgSuccess("提交成功", function () {
                                parent.submitFunction('#myForm');
                            });
                        } else {
                            util.layerMsgError("提交失败")
                        }
                    });
                })
                return false;
            });
        });
    })

    function closeSelf() {
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        top.layer.close(index);
    }
</script></body>
</html>